import request from "@/utils/request";

// 查询纸张类型列表
export function listPaperType(query) {
  return request({
    url: "/paper/list",
    method: "get",
    params: query,
  });
}

// 查询纸张类别详细
export function getPaperType(id) {
  return request({
    url: "/paper/" + id,
    method: "get",
  });
}

// 新增纸张类别
export function addPaperType(data) {
  return request({
    url: "/paper",
    method: "post",
    data: data,
  });
}

// 修改纸张类别
export function updatePaperType(data) {
  return request({
    url: "/paper",
    method: "put",
    data: data,
  });
}

// 删除纸张类别
export function delPaperType(id) {
  return request({
    url: "/paper/" + id,
    method: "delete",
  });
}

// 查询纸张列表
export function getPaperList(query) {
  return request({
    url: "/paper/paperList",
    method: "get",
    params: query,
  });
}

// 获取纸张详细信息
export function getPaperDetail(id) {
  return request({
    url: "/paper/paperDetail?id=" + id,
    method: "get",
  });
}

// 新增纸张
export function addPaperDetail(data) {
  return request({
    url: "/paper/addPaper",
    method: "post",
    data: data,
  });
}

// 修改纸张
export function updatePaperDetail(data) {
  return request({
    url: "/paper/updatePaper",
    method: "put",
    data: data,
  });
}

// 删除纸张类别
export function delPaperDetail(id) {
  return request({
    url: "/paper/delPage?id=" + id,
    method: "delete",
  });
}
